package com.xbongbong.saas.enums.dictionary;

import com.xbongbong.i18n.util.I18nMessageUtil;
import lombok.Getter;

/**
 * 数据字典-合同类型
 * @author haibin.zhang
 * @version v1.0
 * @date 2019/2/26 10:19
 * @since v1.0
 */
@Getter
public enum ContractTypeEnum {
    DIRECT_SALE_CONTRACT("1", "enum.contractType.name.direct_sale_contract","directSaleContract"),
    AGENCY_CONTRACT("2", "enum.contractType.name.agency_contract","agencyContract"),
    SERVICE_CONTRACT("3", "enum.contractType.name.service_contract","serviceContract"),
    QUICK_SALE_CONTRACT("4", "enum.contractType.name.quick_sale_contract","quickSaleContract"),
    ;
    private String code;
    private String name;
    private String attr;

    ContractTypeEnum(String code, String name, String attr) {
        this.code = code;
        this.name = name;
        this.attr = attr;
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }
}
